﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DotNetNuke.Common.Utilities;
using Christoc.Modules.CouponsDiscounts.Data;

namespace Christoc.Modules.CouponsDiscounts.Components
{
    public class TransactionController
    {
        public static List<Transaction> GetTransactions()
        {
            return CBO.FillCollection<Transaction>(DataProvider.Instance().GetTransactions());            
        }

        public static void Save(Transaction transaction)
        {
            transaction.TransactionId = DataProvider.Instance().AddTransaction(transaction);
        }
    }
}